package lianxi;

//字符串验证码

import java.util.Random;
@SuppressWarnings("all")
public class test02 {
    public static void main(String[] args) {

        String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefg" +
                "hijklmnopqrstuvwxyz0123456789";
        Random r = new Random();
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < 4; i++) {
            int index = r.nextInt(s.length());
            char c= s.charAt(index);
            sb.append(c);
        }
        String yzm = sb.toString();
        System.out.println(yzm);
    }
}